package cn.oesoft.blog.service.impl;

import cn.oesoft.blog.mapper.UserMapper;
import cn.oesoft.blog.model.domain.User;
import cn.oesoft.blog.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author ：zhaoweiwei
 * @date ：创建于 2025/5/15 15:09
 * @description：
 * @modified By：
 * @version: 1.0.0
 */
@Service
@Transactional
public class UserServiceImpl implements IUserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public void addUser(User user) {
        userMapper.addUser(user);
        //给新用户分配普通用户权限
        userMapper.giveAuthorityToNewUser(user);
    }
}
